package fileIO;
//This is for Static methods only!
public class FileUtil 
{
	public static String[] parse(String rawConfig)
	{
		//TODO: fix this for options with multiple arguments (i.e. loaded mod lsit or w/e)
		//0 = config name
		//1+ = config vals
		String parsed[] = new String[2];
		int breakPoint = rawConfig.indexOf("=");
		
		if (breakPoint < 0) {			// if no '=' token was found in this string
			parsed[0] = "";					// pass empty values
			parsed[1] = "";
		} else {						// else parse values
			parsed[0] = rawConfig.substring(0,breakPoint).toLowerCase().trim(); //split the line into the two halves
			parsed[1] = rawConfig.substring(breakPoint+1).toLowerCase().trim();  //also, cleans and trims it
		}
		return parsed;
	}
}
